def multiplication_table(n):
    for i in range(1, n+1):
        for j in range(1, n+1):
            print("{:2d}".format(i*j), end=' ')
        print()

num = int(input("请输入一个整数："))

# 打印n*n乘法表
multiplication_table(num)# 打印乘法表